package net.alan.modules.filter;

import org.springframework.context.annotation.Configuration;

/**
 * 过滤器注册
 * Author 李岩飞
 * Email eliyanfei@126.com
 * 2017/11/21
 */
@Configuration
public class FilterConfiguration {
    /*利用切面处理权限登录问题，这里不再使用*/
//    @Bean
    /*public FilterRegistrationBean sessionFilterRegistration() {
        System.out.println("===================注册sessionFilter==================");
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(sessionFilter());
        registration.setAsyncSupported(false);
        registration.setName("asessionFilter");
        registration.addUrlPatterns("*//*");
        registration.setMatchAfter(true);
        registration.setOrder(1);
        return registration;
    }

    //    @Bean
    public Filter sessionFilter() {
        return new SessionFilter();
    }*/
}